<template>
	<view class="app">
		<view class="app-1">
			<text @tap="onTab(0)" :class="{ on: curIndex == 0 }">待开活动</text>
			<text @tap="onTab(1)" :class="{ on: curIndex == 1 }">已开活动</text>
		</view>
		<view class="app-2">
			<view class="app-21" v-if="curIndex == 0">
				<view class="app2-list">
					<view class="" v-for="(item, index) in 15" :key="index">
						<view class="">
							<view class="">
								<text>主题：</text>
								<text>疫情防控彰显大国精神</text>
							</view>
							<view class="">
								<text>活动时间：</text>
								<text>2019-5-6 10:00-11:00am</text>
							</view>
						</view>
					</view>
				</view>
				<view class="loading-text">{{ loadingText }}</view>
			</view>
			<view class="app-22" v-if="curIndex == 1"></view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			curIndex: 0,
			page: 1,
			pageSize: 10,
			loadingText: '到底了......'
		};
	},
	onReachBottom: function() {
		this.page++;
		console.log(this.page);
	},
	methods: {
		onTab(ind) {
			this.curIndex = ind;
		}
	}
};
</script>

<style lang="scss">
@import './wodehuodong.scss';
</style>
